package com.zshan.clinic.admin.mapper.medical;


import com.zshan.clinic.admin.entity.vo.ChargeOrderDetailVo;
import com.zshan.clinic.admin.entity.vo.ChargeOrderPageVo;
import com.zshan.clinic.database.model.ChargeOrderItem;
import com.zshan.clinic.mybatis.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface SpecChargeOrderMapper extends SuperMapper {

    /**
     * 保存收费项目
     * @param itemList
     */
    void addOrderItemBatch(@Param("itemList") List<ChargeOrderItem> itemList);

    /**
     * 获取订单列表
     * @param clinicId
     * @param patientName
     * @return
     */
    List<ChargeOrderPageVo> getOrderList(@Param("clinicId") Long clinicId,
                                         @Param("visitDate") LocalDate visitDate,
                                         @Param("patientName") String patientName,
                                         @Param("offset") Integer offset,
                                         @Param("limit") Integer limit);

    /**
     * 查询订单明细
     * @param clinicId
     * @param orderId
     * @return
     */
    ChargeOrderDetailVo getOrderDetail(@Param("clinicId") Long clinicId,
                                       @Param("orderId") Long orderId);
}
